package study.wechat.pub.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@Slf4j
@RestController
public class CallbackController {

    @RequestMapping("/wechat/callback")
    public String callback(HttpServletRequest request) {
        request.getParameter("signature");
        request.getParameter("timestamp");
        request.getParameter("nonce");
        String echo = request.getParameter("echostr");
        log.info(">>>>>>>>>>>>>>> {}", echo);
        return echo;
    }
}
